//
//  heartutil.h
//  Light
//
//  Created by WangJiaheng on 16/1/22.
//  Copyright © 2016年 骁唐. All rights reserved.
/*
 计算心率的C文件
 */
//#ifndef _HEARTUTIL_H
//#define _HEARTUTIL_H

#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <memory.h>
#include <math.h>
//#include <iostream.h>
//#include <iostream>

int QRSdetection(double * data_m,int * dataout,int len_m, int length_out);
int QRSdetect(double *data_m,int len,int * dataout);
double mean_select(double *data,int n1,int n2);
int moving_average(double *datain,int L,int len,double *out);
int filter2(double *Bn,double *An,int len1,int len2,
            double *datain,int len3,double *out);
double diff_mean(int *datain,int interval1,int interval2);
double diff_mean2(double *datain,int interval1,int interval2);
int max(double *data_in,int st,int end);


//#endif